//Source file: D:\\test\\com\\ce\\pms\\charge\\model\\CollecDetail.java

package com.ce.pms.charge.model;

import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.ce.pms.customer.model.ProRightDO;
import com.ce.pms.house.model.HouseDomain;
import com.sitechasia.webx.core.model.IDomainObject;

/**
 * 实体名称:托收明细 关联数据表:FEE_COLLECTION_DETAIL
 */
@Entity
@Table(name = "FEE_COLLECTION_DETAIL")
public class CollecDetail implements IDomainObject{

	/**
	 * 主键
	 */
	@Id
	@GeneratedValue
	@Column(name = "COLLECTION_DETAIL_ID", nullable = false)
	private Long collecDetailId;

	/**
	 * 房屋
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "HOUSE_ID", nullable = false)
	private HouseDomain house;

	/**
	 * 产权
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PRO_RIGHT_ID", nullable = false)
	private ProRightDO proRight;

	/**
	 * 银行帐号
	 */
	@Column(name = "ACC_NUMBER", length = 20)
	private String accNumber;

	/**
	 * 开户人
	 */
	@Column(name = "ACC_OWNER", length=32 , nullable = false)
	private String accOwner;

	/**
	 * 划帐金额
	 */
	@Column(name = "AMT", precision = 18, scale = 2)
	private BigDecimal amt = new BigDecimal("0.00");

	/**
	 * 划帐状态:001新建;002划帐成功;003划帐失败
	 */
	@Column(name = "STATUZ", length = 3, nullable = false)
	private String statuz;

	/**
	 * 托收文件
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "COLLECTION_ID")
	private CollectionFileDomain collecFile;


	@OneToMany
	@JoinTable(name="FEE_C_DETAIL_R_TRANS",
			 joinColumns={@JoinColumn(name="COLLECTION_DETAIL_ID")},
			 inverseJoinColumns={@JoinColumn(name="TRANSACTION_ID")})
	private Set<AbstractTrans> transSet = new HashSet<AbstractTrans>();


	public Set<AbstractTrans> getTransSet() {
		return transSet;
	}


	public void setTransSet(Set<AbstractTrans> transSet) {
		this.transSet = transSet;
	}


	/**
	 * @roseuid 48757D1202FD
	 */
	public CollecDetail() {

	}


	/**
	 * mini construct
	 * @param house 房屋
	 * @param proRight 产权
	 * @param accNumber 银行帐号
	 * @param accOwner 开户人
	 * @param statuz 划帐状态:001新建;002划帐成功;003划帐失败
	 */
	public CollecDetail(HouseDomain house, ProRightDO proRight, String accNumber,String accOwner, String statuz) {
		this.house = house;
		this.proRight = proRight;
		this.accNumber = accNumber;
		this.accOwner = accOwner;
		this.statuz = statuz;
	}



	public String getAccNumber() {
		return accNumber;
	}

	public void setAccNumber(String accNumber) {
		this.accNumber = accNumber;
	}

	public BigDecimal getAmt() {
		return amt;
	}

	public void setAmt(BigDecimal amt) {
		this.amt = amt;
	}

	public Long getCollecDetailId() {
		return collecDetailId;
	}

	public void setCollecDetailId(Long collecDetailId) {
		this.collecDetailId = collecDetailId;
	}

	public CollectionFileDomain getCollecFile() {
		return collecFile;
	}

	public void setCollecFile(CollectionFileDomain collecFile) {
		this.collecFile = collecFile;
	}

	public HouseDomain getHouse() {
		return house;
	}

	public void setHouse(HouseDomain house) {
		this.house = house;
	}

	public ProRightDO getProRight() {
		return proRight;
	}

	public void setProRight(ProRightDO proRight) {
		this.proRight = proRight;
	}

	public String getStatuz() {
		return statuz;
	}

	public void setStatuz(String statuz) {
		this.statuz = statuz;
	}


	public String getAccOwner() {
		return accOwner;
	}


	public void setAccOwner(String accOwner) {
		this.accOwner = accOwner;
	}

}
